//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include <asm.h>

.global C_SYMBOL(save_flags_cli)
.global C_SYMBOL(restore_flags)
//==========================================================================
//disable fiq and irq, return r0 include the cpsr content

C_SYMBOL(save_flags_cli):
    mrs     r0, cpsr    //return current flags for restore later
    orr     r12, r0, #0xC0  //cli
    msr     cpsr_cf, r12
    mov     pc, lr

//==========================================================================
// r0 include the cpsr content

C_SYMBOL(restore_flags):
    msr     cpsr_cf, r0
    mov     pc, lr

